﻿<UserControl x:Class="Mal.Balades.Admin.Views.VisitViews.Edit.VisitTab"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:controls="clr-namespace:Mal.Balades.Admin.Controls"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">

    <Grid x:Name="LayoutRoot">
        <Grid.Resources>
           

        </Grid.Resources>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition  Height="30"/>
            <RowDefinition  Height="30"/>
            <RowDefinition  Height="100"/>
            <RowDefinition  Height="250"/>
        </Grid.RowDefinitions>

        <!-- Row 0 -->
        <TextBlock Text="Title" Grid.Column="0" Grid.Row="0" 
                   Style="{StaticResource Title}" />
        <TextBox  Grid.Column="1" Grid.Row="0" Style="{StaticResource Text}"
            Text="{Binding SourceVisit.Title, Mode=TwoWay}" />

        <!-- Row 1-->       
        <TextBlock Text="Url" Grid.Column="0" Grid.Row="1"
                    Style="{StaticResource Title}"/>
      
        <TextBox  Grid.Column="1" Grid.Row="1" Style="{StaticResource Text}" IsReadOnly="True"
            Text="{Binding SourceVisit.UrlName, Mode=TwoWay}" />

        <!-- Row 2-->
        <StackPanel Grid.Column="0" Grid.Row="2" Style="{StaticResource TitleQualityPanel}" >
            <CheckBox IsChecked="{Binding SourceVisit.QualityCategories, Mode=TwoWay}" />
            <TextBlock Text="Catégorie" Style="{StaticResource TitleQuality}"/>
        </StackPanel>

        <StackPanel Grid.Column="1" Grid.Row="2" Orientation="Horizontal" >
            <ComboBox ItemsSource="{Binding SourceVisit.PlaceCategories}"
                      SelectedItem="{Binding SourceVisit.SelectedPlaceCategory}">
                <ComboBox.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Name}" />
                    </DataTemplate>
                </ComboBox.ItemTemplate>
            </ComboBox>

            <ComboBox ItemsSource="{Binding SourceVisit.MarketingCategories}"
                      SelectedItem="{Binding SourceVisit.SelectedMarketingCategory}">
                <ComboBox.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Name}" />
                    </DataTemplate>
                </ComboBox.ItemTemplate>
            </ComboBox>
        </StackPanel>
        
        <!-- Row 3-->
        <StackPanel Grid.Column="0" Grid.Row="3" Style="{StaticResource TitleQualityPanel}" >
            <CheckBox IsChecked="{Binding SourceVisit.QualitySumUp, Mode=TwoWay}" />
            <TextBlock Text="Résumé" Style="{StaticResource TitleQuality}"/>
        </StackPanel>

        <controls:HtmlTextEditor Grid.Column="1" Grid.Row="3" 
                                  Style="{StaticResource HtmlText}"
                                 Text="{Binding SourceVisit.SumUp, Mode=TwoWay}" >

        </controls:HtmlTextEditor>


        <!-- Row 4-->
        <StackPanel Grid.Column="0" Grid.Row="4" Style="{StaticResource TitleQualityPanel}" >
            <CheckBox IsChecked="{Binding SourceVisit.QualityText, Mode=TwoWay}" />
            <TextBlock Text="Texte" Style="{StaticResource TitleQuality}"/>
        </StackPanel>
        <controls:HtmlTextEditor Grid.Column="1" Grid.Row="4" 
                                  Style="{StaticResource HtmlText}"
                                 Text="{Binding SourceVisit.Text, Mode=TwoWay}" />



    </Grid>
</UserControl>
